﻿<script src="~/Scripts/AdminControllers/ChurchWorkerInfoController.js"></script>
<div class="row">
    <div class="col-md-12" ng-controller="ChurchWorkerInfoController">
        <div class="modal fade bs-example-modal-panel" tabindex="-1" id="ChurchWorker" role="dialog" aria-labelledby="myPanelModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header bg-primary">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">{{title}}</h4>
                    </div>
                    <form name="fromvalidate" novalidate>
                        <div class="modal-body">
                            <div class="form-group">
                                <div class="col-md-6" style="padding: 0px;">
                                    <div class="form-group">
                                        Designation
                                        <select ng-model="ChurchWorker.ChurchWorkerDesignationId"
                                                ng-options="obj.ChurchWorkerDesignationId as obj.ChurchWorkerDesignationName for obj in ChurchWorkerDesignation"
                                                class="form-control" ng-required="true"></select>
                                    </div>
                                </div>
                                <div class="col-md-6" style="padding-left: 10px; padding-right: 0px;">
                                    <div class="form-group">
                                        Initial
                                        <input type="text" class="form-control" ng-model="ChurchWorker.Initial" maxlength="1" ng-required="false">
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-4" style="padding: 0px;">
                                    <div class="form-group">
                                        First Name
                                        <input type="text" class="form-control" ng-model="ChurchWorker.FirstName" ng-required="true">
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="form-group">
                                        Middle Name
                                        <input type="text" class="form-control" ng-model="ChurchWorker.MiddleName" ng-required="false">
                                    </div>
                                </div>
                                <div class="col-md-4" style="padding: 0px;">
                                    <div class="form-group">
                                        Last Name
                                        <input type="text" class="form-control" ng-model="ChurchWorker.LastName" ng-required="false">
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>

                            <div class="form-group">
                                Gender
                                <select ng-model="ChurchWorker.Gender"
                                        ng-options="obj.Gender as obj.GenderName for obj in Genders"
                                        class="form-control" ng-required="true"></select>
                            </div>
                            <div class="form-group">
                                Native Place
                                <input type="text" class="form-control" ng-model="ChurchWorker.NativePlace" ng-required="false">
                            </div>
                            <div class="form-group">
                                Father's Name
                                <input type="text" class="form-control" ng-model="ChurchWorker.Fathers" ng-required="false">
                            </div>
                            <div class="form-group">
                                Date Of Birth
                                <input type="text" class="form-control" ng-model="ChurchWorker.DateOfBirth" calendar ng-required="false">
                            </div>
                            <div class="form-group">
                                Date Of Salvation
                                <input type="text" class="form-control" ng-model="ChurchWorker.DateOfSalvation" calendar ng-required="false">
                            </div>
                            <div class="form-group">
                                Date Of Baptism
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfBaptism">
                            </div>
                            <div class="form-group">
                                Date Of Anointing
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfAnointing">
                            </div>
                            <div class="form-group">
                                Date Of Joining In full time Minitry
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfJoiningInMinitry">
                            </div>
                            <div class="form-group">
                                Date Of Joining In our Minitry
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfJoiningInOurMinitry">
                            </div>
                            <div class="form-group">
                                <input type="checkbox" ng-model="ChurchWorker.IsTakenTraining">
                                Is Taken Training
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsTakenTraining">
                                Year Training
                                <input type="text" class="form-control" ng-model="ChurchWorker.YearOfTraining" ng-required="ChurchWorker.IsTakenTraining">
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsTakenTraining">
                                Place Of Training
                                <input type="text" class="form-control" ng-model="ChurchWorker.PlaceOfTraining" ng-required="ChurchWorker.IsTakenTraining">
                            </div>
                            <div class="form-group">
                                Education
                                <input type="text" class="form-control" ng-model="ChurchWorker.Education">
                            </div>

                            <div class="form-group">
                                <input type="checkbox" ng-model="ChurchWorker.IsMarried">
                                Is Married
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsMarried">
                                Date Of Marriage
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfMarriage">
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsMarried">
                                Name Of Wife/Husband
                                <input type="text" class="form-control" ng-model="ChurchWorker.NameOfLifePartner">
                            </div>
                            <div class="form-group">
                                Country
                                <select ng-model="ChurchWorker.PresentAddress.PresentCountryId"
                                        ng-options="obj.CountryId as obj.CountryName for obj in countries"
                                        class="form-control" ng-required="true"></select>
                            </div>
                            <div class="form-group">
                                State
                                <select ng-model="ChurchWorker.PresentAddress.PresentState"
                                        ng-options="obj.StateId as obj.StateName for obj in states"
                                        class="form-control"
                                        ng-required="true"></select>
                            </div>
                            <div class="form-group">
                                City
                                <input type="text" class="form-control" name="PresentCity" ng-model="ChurchWorker.PresentAddress.PresentCity">
                            </div>
                            <div class="form-group">
                                Address
                                <textarea class="form-control" name="PresentAdress" ng-model="ChurchWorker.PresentAddress.PresentAddress" maxlength="100" ng-required="true"></textarea>
                            </div>
                            <div class="form-group">
                                Pincode
                                <input type="text" class="form-control" name="PresentPin" ng-model="ChurchWorker.PresentAddress.PresentPin" ng-maxlength="6" ng-minlength="6">
                                <p class="error" ng-show="fromvalidate.PresentPin.$error.minlength">Invalid pin</p>
                                <p class="error" ng-show="fromvalidate.PresentPin.$error.maxlength">Invalid pin</p>
                            </div>
                            <div class="form-group">
                                Photo
                                <input type="file" name="fileInput" onchange="angular.element(this).scope().fileChangedChurchWorkerImage(event)" class="upload" accept="image/*">
                            </div>
                            <div class="form-group">
                                Application Copy
                                <input type="file" name="fileInput" onchange="angular.element(this).scope().fileChangedChurchWorkerApplication(event)" class="upload" accept="image/*">
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsMarried">
                                Date Of Application
                                <input type="text" class="form-control" calendar ng-model="ChurchWorker.DateOfApplication">
                            </div>
                            <div class="form-group" ng-show="ChurchWorker.IsMarried">
                                Place Of Application
                                <input type="text" class="form-control" ng-model="ChurchWorker.PlaceOfApplication">
                            </div>
                            <div class="form-group">
                                Email
                                <input type="text" class="form-control" name="MotherName" ng-model="ChurchWorker.Email">
                            </div>
                            <div class="form-group">
                                Phone
                                <input type="text" class="form-control" name="MotherName" ng-model="ChurchWorker.Phone">
                            </div>
                            <div class="form-group">
                                Current Status
                                <select ng-model="ChurchWorker.ChurchWorkerStatusId"
                                        ng-options="obj.ChurchWorkerStatusId as obj.ChurchWorkerStatusName for obj in ChurchWorkerStatuss"
                                        class="form-control"
                                        ng-required="true"></select>
                            </div>
                            <div class="form-group">
                                Remarks
                                <textarea class="form-control" ng-model="ChurchWorker.Remarks"></textarea>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                            <button type="button" class="btn btn-primary" ng-disabled="fromvalidate.$invalid || buttonstate" ng-click="save(modelstate);">Save</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="bg-white bs-0 mb-20 widget">
            <div class="custom-grid-header">
                <div class="custom-grid-name">
                    {{entity.Designation.ChurchWorkerDesignationAbrivation}}. {{data.Initial}} {{entity.FirstName}} {{entity.MiddleName}} {{entity.LastName}}
                </div>
                <div class="custom-grid-menu">
                    <ul class="custom-grid-menu-ul pull-right">
                        <li class="custom-grid-menu-ul-li">
                            <a href="../ChurchWorkers" class="text-white"><i class="zmdi zmdi-tag-backspace"></i></a>
                        </li>
                        <li class="custom-grid-menu-ul-li dropdown">
                            <a href="javascript:;" class="dropdown-toggle text-white"><i class="zmdi zmdi-print"></i></a>
                        </li>
                        <li class="custom-grid-menu-ul-li" ng-click="edit(entity.ChurchWorkerId)">
                            <a href="javascript:;" class="text-white"><i class="fa fa-pencil"></i></a>
                        </li>
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="widget-body">
                <div class="ChurchworkerDetails-Container">
                    <div class="ChurchworkerDetails-CoverPic">
                    </div>
                    <div class="ChurchworkerDetails-Details">
                        <div class="ChurchworkerDetails-Details-profile">
                            <div class="ChurchworkerDetails-Details-profile-imgdiv">
                                <img src="~/Images/_ErrorImage.png" actual-image="~/Uploads/Admin/ChurchWorkers/Photo/{{entity.Photo}}" on-error-src="~/Images/_LoadImage.jpg">
                                <div class="ChurchworkerDetails-Details-profile-img-row"><b>{{entity.Designation.ChurchWorkerDesignationAbrivation}}. {{entity.FirstName}} {{entity.MiddleName}} {{entity.LastName}}</b></div>
                                <div class="ChurchworkerDetails-Details-profile-img-row" ng-show="entity.Phone!=''">{{entity.Phone}}</div>
                                <div class="ChurchworkerDetails-Details-profile-img-row" ng-show="entity.Email!=''">{{entity.Email}}</div>
                            </div>
                        </div>
                    </div>
                    <div class="ChurchworkerDetails-Details-profiledetails">
                        <table class="table table-striped table-bordered">
                            <tbody>
                                <tr>
                                    <td style="width: 20%;">Designation</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Designation.ChurchWorkerDesignationAbrivation}}</td>
                                    <td style="width: 20%;">First Name</td>
                                    `
                                        <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.FirstName.length!=0">{{entity.FirstName}}</span><span ng-show="entity.FirstName.length==0">-</span></td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Middle Name</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.MiddleName.length!=0">{{entity.MiddleName}}</span><span ng-show="entity.MiddleName.length==0">-</span></td>
                                    <td style="width: 20%;">Last Name</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.LastName.length!=0">{{entity.LastName}}</span><span ng-show="entity.LastName.length==0">-</span></td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">No Of Family Members</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.ChurchWorkerFamilyDetails!=null">{{entity.ChurchWorkerFamilyDetails.length}}</span><span ng-show="entity.ChurchWorkerFamilyDetails==null">0</span></td>
                                    <td style="width: 20%;">Is Login Created</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.CreateLogin">Yes</span><span ng-hide="entity.CreateLogin">No</span></td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Gender</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.Gender==1">Male</span><span ng-show="entity.Gender==2">FeMale</span></td>
                                    <td style="width: 20%;">Native Place</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.NativePlace}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Father's Name</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Fathers}}</td>
                                    <td style="width: 20%;">Date Of Birth</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfBirth}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Date Of Anointing</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfAnointing}}</td>
                                    <td style="width: 20%;">Date Of Baptism</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfBaptism}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Date Of Salvation</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfSalvation}}</td>
                                    <td style="width: 20%;">Date Of Joining</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfJoiningInMinitry}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Joining in our minitry</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfJoiningInOurMinitry}}</td>
                                    <td style="width: 20%;">Is Taken Training</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;"><span ng-show="entity.IsTakenTraining">Yes</span><span ng-hide="entity.IsTakenTraining">No</span></td>
                                </tr>
                                <tr ng-show="entity.IsTakenTraining">
                                    <td style="width: 20%;">Year Training</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.YearOfTraining}}</td>
                                    <td style="width: 20%;">Place Of Training</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.PlaceOfTraining}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Education</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Education}}</td>
                                    <td style="width: 20%;">Designation</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Designation.ChurchWorkerDesignationName}}</td>
                                </tr>
                                <tr ng-show="entity.IsMarried">
                                    <td style="width: 20%;">Date Of Marriage</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.DateOfMarriage}}</td>
                                    <td style="width: 20%;">Name Of Husbend/Wife</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.NameOfLifePartner}}</td>
                                </tr>
                                <tr>
                                    <td style="width: 20%;">Phone</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Phone}}</td>
                                    <td style="width: 20%;">Email</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;">{{entity.Email}}</td>
                                </tr>
                                <tr ng-if="entity.Remarks!=''">
                                    <td style="width: 20%;">Remarks</td>
                                    <td style="width: 3%; text-align: center;">:</td>
                                    <td style="width: 27%;" colspan="4">{{entity.Remarks}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
    @Html.Action("_ChurchWorkerFamily", "ChurchWorkers", new { area = "Admin" })
    <div class="clearfix"></div>
    @Html.Action("_ChurchWorkerHistory", "ChurchWorkers", new { area = "Admin" })
    <div class="clearfix"></div>
    @Html.Action("_ChurchWorkerOrdinations", "ChurchWorkers", new { area = "Admin" })
    <div class="clearfix"></div>
    @Html.Action("_ChurchWorkerKnownLanguages", "ChurchWorkers", new { area = "Admin" })
    <div class="clearfix"></div>
    @Html.Action("_ChurchWorkerDocuments", "ChurchWorkers", new { area = "Admin" })
    
</div>
